package com.jiaai.shop.store.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.enums.IdType;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 商品图
 * </p>
 *
 * @author
 * @since 2018-04-01
 */
@TableName("s_goods")
public class SGoods extends Model<SGoods> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 商品名称
     */
	private String goodsName;
    /**
     * 商品介绍
     */
	private String goodsContext;
    /**
     * 商品图片
     */
	private String goodsImg;

	@JSONField(deserialize = false)
	private Date time;
    /**
     * 状态（0，未上架，1，上架）
     */
	private Integer state;
    /**
     * 对应的返回积分
     */
	private Integer integral;

	private int lv;
	/**
	 * 商品价格
	 */
	private BigDecimal goodsPrice;

	/**
	 *赠送积分
	 */
    private  Integer presentedIntegral;

	/**
	 *积分有效时间
	 */
    private  Integer integralEffectivetime;

	public Integer getIntegralEffectivetime() {
		return integralEffectivetime;
	}

	public void setIntegralEffectivetime(Integer integralEffectivetime) {
		this.integralEffectivetime = integralEffectivetime;
	}

	public  Integer getPresentedIntegral(){ return  presentedIntegral;}

    public  void setPresentedIntegral(Integer presentedIntegral){ this.presentedIntegral = presentedIntegral;}

	public BigDecimal getGoodsPrice(){ return goodsPrice;}

    public  void  setGoodsPrice(BigDecimal goodsPrice){this.goodsPrice = goodsPrice;}

	public int getLv() {return lv;}

	public void setLv(int lv) {
		this.lv = lv;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public String getGoodsContext() {
		return goodsContext;
	}

	public void setGoodsContext(String goodsContext) {
		this.goodsContext = goodsContext;
	}

	public String getGoodsImg() {
		return goodsImg;
	}

	public void setGoodsImg(String goodsImg) {
		this.goodsImg = goodsImg;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getIntegral() {
		return integral;
	}

	public void setIntegral(Integer integral) {
		this.integral = integral;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
